package com.yfp.machine.service.impl;

import com.yfp.machine.domain.VideoResource;
import com.yfp.machine.mapper.VideoResourceMapper;
import com.yfp.machine.service.VideoResourceService;
import org.springframework.stereotype.Service;
import jakarta.annotation.Resource;

import java.util.List;

/**
 * 视频资源表(VideoResource)表服务实现类
 *
 *
 * @since 2023-12-21 19:22:00
 */
@Service("videoResourceService")
public class VideoResourceServiceImpl implements VideoResourceService {
    @Resource
    private VideoResourceMapper videoResourceMapper;

    /**
     * 通过ID查询单条数据
     *
     * @return 实例对象
     */
    @Override
    public VideoResource queryById(String videoId) {
        return this.videoResourceMapper.queryById(videoId);
    }

    /**
     * 分页查询
     *
     * @param videoResource 筛选条件
     * @return 查询结果
     */
    @Override
    public List<VideoResource> queryByPage(VideoResource videoResource) {
        return this.videoResourceMapper.queryAllByLimit(videoResource);
    }

    /**
     * 新增数据
     *
     * @param videoResource 实例对象
     * @return 实例对象
     */
    @Override
    public VideoResource insert(VideoResource videoResource) {
        this.videoResourceMapper.insert(videoResource);
        return videoResource;
    }


}
